home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Tele / S / Slic.cpt / SLIC V1.0 / SLIC V1.0
Encoding:
Text File  |  1991-04-09  |  30.3 KB  |  944 lines  |  [APPL/SLIC]

  1. Survey Language Instruction Converter          Version 1.0
  2.  
  3.  
  4. By: Char-lez Braden
  5.  
  6.  
  7. INTRODUCTION
  8.  
  9.  
  10.           The purpose of SLIC is to aid Second Sight (C) users in the 
  11. creation and editing of Survey files.  This comes from my own 
  12. frustration with using survey files.
  13.  
  14.           SLIC is not to be a full featured development environment.  
  15. Think of it as a custom body shop, not an auto factory.  SLIC is MUCH 
  16. easier to use than native Survey commands, and SLIC can accommodate all 
  17. the survey commands at the time of it's creation.  SLIC cannot contend 
  18. with every possiblity a user can type in.  I've worked hard to make it 
  19. reject bogus commands, but confusing SLIC is possible.
  20.           This program is made for those who are willing to try and get 
  21. it right.  I subscribe to the theory of Garbage In, Garbage Out.
  22.  
  23.  
  24.           THIS MANUAL: The manual is divided into four chapters.  The 
  25. first is "Theory of operation".  This chapter will cover how you use a 
  26. survey file and what its capabilities are.  The second chapter, 
  27. "Syntax", gives definitions of each command.  The third chapter, 
  28. "Operation of SLIC.", and tells how to use the program.  The fourth 
  29. chapter is "Tables" and it contains the quick reference material.
  30.  
  31.           Slic is marketed under the shareware concept.  I'm asking for 
  32. $15.00, cash, check or charge (Visa or Mastercard).  Register your copy 
  33. for upgrades and support.  Call me at 408/942-5480.  You may distribute 
  34. SLIC freely, but you must enclude this documentation file.
  35.  
  36.  
  37.  
  38. CHAPTER 1:THEORY OF OPERATION
  39.  
  40.           The purpose of this chapter is to give an overview of how a 
  41. survey file works and what it can do for you.
  42.  
  43.           A survey file is very flexible, and I think it would place 
  44. limits on your imagination to try and say that a survey file is limited 
  45. to applications A, B and C.
  46.           The best way to determine what a survey file is good for is to 
  47. look at what it can and CANNOT do.
  48.  
  49.           A survey file can collect data from a user.
  50.           A survey file can react to the data it collects.
  51.           A survey file can store the collected data.
  52.           A survey file can change user time, level & flags.
  53.           A survey file can build report files.
  54.           A Survey file can maintain a tally.
  55.           A Survey file can display a tally.
  56.           A survey, which collects votes, can be set up to insure that 
  57. each ID votes only once.
  58.  
  59.           A Survey file CANNOT react to user time, level or flags.
  60.           A Survey file CANNOT read files.
  61.  
  62.           If you think a survey is what you need, look at the above list 
  63. and ask yourself, "Given these abilities, can it do what I need?"  I 
  64. think you will find that even if the answer is no, a combination of 
  65. surveys and menus will do most any job.
  66.  
  67.  
  68.           First you need to know what a survey file is.  A survey file 
  69. is a set of  instructions the computer follows.  So, in reality, you 
  70. program, or script, a survey file.
  71.  
  72.           The next thing I want to introduce is the concept of "User 
  73. Input".  User input is what the user sends to you.  SLIC represents user 
  74. input by the keyword "INPUT".  You can only deal with one input at a 
  75. time.  Each time you request a new input from the user the old one is 
  76. erased, so finish what you start!
  77.  
  78.           The Response File, call the .RES file, is what you need to 
  79. know about next.  The Response File contains all the final formatted 
  80. responses from the user.  You do not add information directly to the 
  81. Response File.  You format the user input using the Scratch File, 
  82. described below. Once you have the correct format you append the Scratch 
  83. File to the Response File.
  84.  
  85.           The Scratch File comes next.  The scratch file is a temporary 
  86. file. You use it to format the users input into your desired format.  
  87. Once the file is formatted you append the scratch file onto the response 
  88. file.  You cannot add anything directly to the response file, all input 
  89. must first go into the scratch file.  The scratch file is erased each 
  90. time the survey is executed (or when you direct SLIC to  erase the file 
  91. specifically.)
  92.  
  93.           To demonstrate these concepts, I have produced a quick demo 
  94. survey file.
  95.  
  96.  
  97.           DEMO 1: Questionnaire
  98.  
  99.           Scenario: You, as the Sys. Op., have determined that you want 
  100. to validate each user data before giving them access to your system.
  101.  
  102.           First you determine which questions are relevant.  For this 
  103. demo we are going to ask for the users real name, phone number and 
  104. address, but we are in no way limited to these questions.
  105.  
  106. Sample Code:
  107.  
  108. "START"
  109. 'Introduction
  110. print "Thanks for interest in The Simple BBS."
  111. Print
  112. Print "Before I give you full access I need some"
  113. Print "Personal information."
  114. print
  115. 'Question #1
  116. input "Real Name :" 35
  117. scratch write input
  118. print
  119. 'Question #2
  120. input "Phone number ###/###-####:" 12
  121. scratch write input
  122. print
  123. 'Question #3
  124. input "Address :" 60
  125. Scratch write input
  126. print
  127. 'Verify
  128. input "Is the above correct ?"YN
  129. if input = "Y" goto "END"
  130. restart
  131. "END"
  132. 'Save data
  133. Scratch append
  134. Exit
  135.           
  136.           If you want, use your word processor to copy the above code 
  137. and TRY IT!
  138.  
  139.  
  140.           With just the simple tools from the sample above, you can do 
  141. plenty, but let's not stop there.
  142.  
  143.           The next concept is an accumulator.  An accumulator is like 
  144. the memory on your calculator.  You can store a number in it, add 
  145. numbers to it, subtract numbers from it, or clear it to zero and even 
  146. print it's values out.  You can have as many accumulators as you wish, 
  147. limited only by the size of your disk.
  148.  
  149.           The counter file is a permanent record of accumulators that's 
  150. written to the disk.  That's it!  Pretty simple eh?  Ok, here's the 
  151. catch; Like the response file, you don't manipulate the count (.CNT) 
  152. file directly.
  153.  
  154.           The last concept is the special scratch file.  The special 
  155. scratch file is a temporary list of accumulators used to set up 
  156. accumulators and then add those accumulators to the permanent .CNT file.  
  157. Why do this?  If during the survey you want to undo changes you can just 
  158. start over, rather than taking into account the original values that 
  159. were present before you started changing things.  In summary, the 
  160. Special scratch file is to the .CNT file as the Scratch file is to the 
  161. .RES file.
  162.  
  163.  
  164.           To demonstrate the accumulator concept, I will show you some 
  165. sample code for a survey that asks to select  a users favorite car from 
  166. a list, and then prints the results.
  167.  
  168. "START"
  169. 'See if user has voted before
  170. If Registered goto "Voted Before"
  171. 'set up special scratch file with 4 accumulators
  172. Special init 4
  173. 'Introduction
  174. "Intro"
  175. print "Favorite car survey."
  176. print
  177. print "1. New Ford Mustang"
  178. print "2. Old Ford Mustang"
  179. print "3. Other Piece of junk"
  180. print
  181. input "Which ?"1
  182. if input = "1" goto "New Ford"
  183. if input = "2" goto "Old Ford"
  184. if input = "3" goto "Junk"
  185. "Bad Input"
  186. print
  187. print "That's not on the list!"
  188. print
  189. print
  190. goto "Intro"
  191. "New Ford"
  192. A1 +1
  193. goto "Tally"
  194. "Old Ford"
  195. A2 +1
  196. goto "Tally"
  197. "Junk"
  198. A3+1
  199. "Tally"
  200. a4 =1
  201. 'Add results to totals
  202. CNT Update
  203. "Print Results"
  204. print
  205. print "Results so far."
  206. print
  207. print "Total voters so far :";
  208. print C4
  209. print
  210. print "New Fords :";
  211. print C1
  212. print "Old Fords :";
  213. print C2
  214. print "Junk :";
  215. print C3
  216. print
  217. input "Press return to go to main menu :" return
  218. exit
  219. "Voted Before"
  220. print
  221. print "You've already voted."
  222. print
  223. goto "Print Results"
  224.  
  225.           Again, whip out the word processor and try it!
  226.  
  227.  
  228. CHAPTER 2: SYNTAX
  229.  
  230.           SYNTAX: Each instruction follows a RIGID syntax.  Nothing is 
  231. assumed, and nothing can be omitted.  When using instructions, the 
  232. Capitolization letters and correct punctuation are essential.
  233.           The lower case n denotes a number.
  234.           When quotes are present, inside will be [text], [name] or 
  235. [path] to tell you what kind of data is expected.  It is important to 
  236. note that two quotes that follow each other with nothing between them 
  237. (empty quotes) will generate an error.  In cases where the quoted data 
  238. is optional, it will be noted specifically.
  239.           The use of quotes with SLIC is both required and tricky.  
  240. While you can use quotes inside of quotes, SLIC will return some strange 
  241. capitalization.  This is due to the fact that SLIC capitalizes 
  242. everything before it looks for it's key words.  But SLIC also tries to 
  243. preserve your capitalization.  Sometimes conflicts occur, and your text 
  244. capitalization will be lost.  When this happens, take your favorite text 
  245. editor and retype those lines that were changed.  I think you'll find 
  246. this a minor annoyance at worst.
  247.           While it seems like this may be restrictive, compare it to 
  248. what you find in the Second Sight (C) manual and you'll be ecstatic.  
  249. The commands of SLIC are designed to be as intuitive as possible.
  250.           Think of this relationship, SLIC is to survey files, as BASIC 
  251. is to assembler.
  252.           SLIC takes instructions that you type (easy for humans to 
  253. understand) and turns them into survey commands (easy for computers to 
  254. understand).
  255.           Because the process of writting a survey file with SLIC is one 
  256. of conversion, I will refer to SLIC commands as instructions, and survey 
  257. file commands as commands.
  258.  
  259. Special Scratch File Accumulators: Are always referred to as "An".
  260. Counter File Accumulators: Are always referred to as "Cn".
  261. Literals:        n - Numeric
  262.           "[text]" - Text literal
  263.           "[path]" - path to a menu or file in the disk
  264.           "[name]" - name of an instruction to branch to
  265.               <CR> - Return or Enter characters, ASCII 13
  266.  
  267.  
  268. '[comment]                       Command -1*
  269.  
  270.           This instruction is used to document your code.  It is 
  271. actually included in the final survey file, should you ever go looking 
  272. through it.  I strongly suggest you use it too much as opposed to too 
  273. little.
  274.  
  275.  
  276. "[label]"                        Command -2*
  277.  
  278.           This instruction is used to name the starting points of 
  279. routines in your survey.  Each section should have a label. It's not 
  280. critical that everything be labelled, but all the instructions that 
  281. branch to other instructions must branch to a label.          
  282.  
  283.  
  284. An = n                           Command 40
  285.  
  286.           This instruction is used to assign a value to a special 
  287. scratch file accumulator.
  288.  
  289.  
  290. An + n                           Command 31
  291.  
  292.           This instruction adds the value of n to the specified special 
  293. scratch file accumulator.  This number n may be a negative number, thus 
  294. it's effectively a subtraction command also.
  295.  
  296.  
  297. An1+ An2                         Command 32
  298.  
  299.           This instruction adds the second special scratch file 
  300. accumulator to the first and stores the result in the first special 
  301. scratch file accumulator.
  302.  
  303.  
  304. CNT UPDATE                       Command 37
  305.  
  306.           This instruction adds all of the Special Scratch File 
  307. Accumulators to their respective .CNT file accumulators.
  308.  
  309.  
  310. DISPLAY "[path]" C               Command 26
  311. DISPLAY "[path]" +               Command 27
  312. DISPLAY "[path]" C+              Command 28
  313. DISPLAY "[path]" F               Command 29
  314.  
  315.           These instructions are used to display a text file.  The 
  316. parameters at the end specify how the display will be shown.
  317.           C : Cancellable with Ctrl-C
  318.           + : Prompts
  319.           F : Final Prompt only
  320.  
  321.  
  322. EXIT                              Command 7
  323.  
  324.           This instruction is used to exit the survey and go return to 
  325. the active menu.  This will usually be the menu that called the survey, 
  326. but not always.  See "Use Menu" below.
  327.  
  328.  
  329. GOTO "[name]"                     Command 2
  330.  
  331.           This instruction causes the flow of execution to jump to the 
  332. line named with the lable instruction (See Above).
  333.  
  334.  
  335. IF INPUT = NULL GOTO "[name]"     Command 4
  336. IF INPUT = "[text]" GOTO "[name]" Command 3
  337. IF REGISTERED GOTO "[name]"       Command 39
  338. IF RATIO NOT n:1 GOTO "[name]"    Command 21
  339.  
  340.           This instruction has the basic structure of IF (expression) 
  341. GOTO "[name]".  If the expression evaluates as true, then branch to the 
  342. instruction named.  Expressions can be as shown below.
  343.  
  344. INPUT = NULL: The last input a user typed was  a <CR> only.
  345. INPUT = "[text]": The last input EQUALS what's in text.
  346. REGISTERED: The user has already registered his/her vote.
  347. RATIO NOT n:1: The users download:upload ratio is not n:1.
  348.  
  349.  
  350. INPUT "[text]" n                  Command 9
  351. INPUT "[text]" YN                 Command 10
  352. INPUT "[text]" RETURN             Command 11
  353. INPUT n                           Command 9
  354. INPUT YN                          Command 10
  355. INPUT RETURN                      Command 11
  356.  
  357.           The input instruction has two parameters, text and type.
  358.           Text is what the users sees before the computer actually 
  359. expects a response.  Usually the text would be the actual question or a 
  360. prompt of some kind.  If you wish to have empty quotes, just leave off 
  361. the quotes all together.
  362.  
  363.           The type parameter tells the computer which kind of input to 
  364. expect and accept.  The three types of input are:
  365.  
  366.                n : Allow n Characters
  367.               YN : Wait for a Y,y or N,n  (<CR> counts as "Y")
  368.           RETURN : wait for <CR> only.
  369.  
  370.  
  371. PRINT                             Command 1
  372. PRINT "[text]"                    Command 1
  373. PRINT "[text]";                   Command 1
  374. PRINT An                          Command 33
  375. PRINT An;                         Command 35
  376. PRINT Cn                          Command 34
  377. PRINT Cn;                         Command 36
  378. PRINT % Cn1/Cn2                   Command 41
  379. PRINT % Cn1/Cn2;                  Command 42
  380.  
  381.  
  382.           Print has two parameters.  The first parameter is the type of 
  383. information that will be sent to the caller, types are explained below.  
  384. The second parameter is the semicolon at the end.  If a print 
  385. instruction has a semicolon then no <CR> will be sent, if it does not 
  386. have a semicolon then a <CR> will be sent.
  387.  
  388.           The type parameters are:
  389.           "Literal" - sends text between quotes
  390.                  An - Sends value of special scratch file accumulator n
  391.                  Cn - Sends value of .CNT file accumulator n
  392.                   % - Sends the percentage of Cn1 to Cn2.  Calculated by
  393.                       (Cn1/Cn2)*100.  The "%" mark is not sent, you must
  394.                        send it yourself.
  395.  
  396.  
  397. REGISTER                          Command 38
  398.  
  399.           The register instruction places the users name in the voted 
  400. list.  This allows you to check who has and hasn't voted, so you can 
  401. allow or disallow more than one vote per user.
  402.  
  403.  
  404. RESTART                           Command 8
  405. RESTART AT "[name]"               Command 20
  406.  
  407.           The restart instruction first clears out the Special Scratch 
  408. File Accumulators by setting them to zero, and then branches to the name 
  409. given.  If no name is given it starts at the beginning of the survey 
  410. again.
  411.  
  412.  
  413. SCRATCH APPEND                    Command 6
  414. SCRATCH SHORT APPEND              Command 44
  415. SCRATCH CHAR n                    Command 19
  416. SCRATCH EOF                       Command 45
  417. SCRATCH ID                        Command 46
  418. SCRATCH WRITE "[text]"            Command 12
  419. SCRATCH WRITE "[text]";           Command 13
  420. SCRATCH WRITE INPUT               Command 5
  421. SCRATCH WRITE INPUT;              Command 43
  422.  
  423. Scratch instructions are really many instructions that I opted to group 
  424. together for simplicity's sake.  Each one deserves its own definition.
  425. Scratch Append : This will take what's in the Scratch File and append it 
  426. to the end of the .RES file.  It then appends the EOF ("Above entries 
  427. made by :[user]/[date]")
  428. Scratch Short Append : This appends the Scratch File to the .RES file, 
  429. but does not append the EOF data.
  430. Scratch Char n : This writes the ASCII equivalent of n (0-255) to the 
  431. Scratch File.
  432. Scratch EOF : This writes the EOF to the Scratch File.
  433. Scratch ID : This writes [User]/[Date] to the Scratch File.
  434. Scratch Write : These four instructions send information to the Scratch 
  435. File.  "[text]" denotes a literal. INPUT means to send the users last 
  436. input to the Scratch file.  If the instruction ends with a semi-colon, 
  437. then no <CR> will be written to the Scratch File.
  438.  
  439.  
  440. SET TIME n                        Command 15
  441. SET LEVEL n                       Command 17
  442. SET ON n                          Command 23
  443. SET OFF n                         Command 25
  444.  
  445.           The Set instructions are used to permanently set the user 
  446. aspects.
  447.             Time : in minutes, 0-255.
  448.            Level : 0-255.
  449.           On/Off : Denotes user Flags 1-24.
  450.  
  451.  
  452. SPECIAL INIT          n           Command 30
  453.  
  454.           The Special Init instruction is used to create the Special 
  455. Scratch File where n determines the number of accumulators to be used.  
  456. It sets all the accumulators to zero.  Don't use this more than once in 
  457. a given survey.
  458.  
  459. TEMP TIME n                       Command 14
  460. TEMP LEVEL n                      Command 16
  461. TEMP ON n                         Command 22
  462. TEMP OFF n                        Command 24
  463.  
  464.           Temp instructions set the various user aspects for the 
  465. duration of this call only.
  466.             Time : in minutes, 0-255.
  467.            Level : 0-255.
  468.           On/Off : Denotes user Flags 1-24.
  469.  
  470.  
  471. USE MENU"[path]"                  Command 18
  472.  
  473.           This instruction is used to set the active menu.  You must 
  474. supply the exact path way on the disc to the menu.  If you supply a 
  475. wrong path Second Sight (C) will default back to the main menu.
  476.  
  477. * instructions -1 & -2 are not true survey file commands.  Every command 
  478. in a survey file has a place for a comment and a name.  SLIC always 
  479. tries to attach a comment or name to the next "real" command, but when 
  480. more than one comment or label is grouped together then SLIC will use a 
  481. special case of the command 1 that has no effect.  By utilizing the 
  482. command 1 as a "No Operation" command SLIC can retain all your comments 
  483. and labels in the actual code.  In the purest sense comments will slow 
  484. execution of a survey file.  Chances are that unless you have written an 
  485. extremely large number of comments, you will see no difference in 
  486. execution.  Please be make liberal use of these commands.
  487.  
  488. CHAPTER 3: Operation of SLIC.
  489.  
  490.           SLIC is a converter only, it does not have any text editing 
  491. features.
  492.  
  493.           SLIC version 1.0 has two menu options.
  494.  
  495.           Convert:  When you select this from the file menu, a finder 
  496. load dialog box comes up.  Use the finder box to locate the file that 
  497. your word processor created with the commands of your survey. This file 
  498. is called the source file.
  499.           Next you will see a finder save dialog box.  This asks you for 
  500. the name of the output file, called the object file.  SLIC automatically 
  501. adds ".OUT" to the name of the in file to prevent accidentally 
  502. overwriting the source file.
  503.           Once you have selected both files SLIC immediately begins 
  504. processing the source file and writing the results to the object file.  
  505. If SLIC runs into an error it will print the error and the information 
  506. in the window and stop.  After you correct the error you must reconvert 
  507. the source file.
  508.  
  509.           Quit:  Select this to exit SLIC.
  510.  
  511. CHAPTER 4: Tables
  512.  
  513. Table 1.   instructions to command.
  514.  
  515. An = n                                     Command 40
  516. An + n                                     Command 31
  517. An1+ An2                                   Command 32
  518. CNT UPDATE                                 Command 37
  519. DISPLAY "[path]" C                         Command 26
  520. DISPLAY "[path]" +                         Command 27
  521. DISPLAY "[path]" C+                        Command 28
  522. DISPLAY "[path]" F                         Command 29
  523. EXIT                                       Command 7
  524. GOTO "[name]"                              Command 2
  525. IF INPUT = NULL GOTO "[name]"              Command 4
  526. IF INPUT = "[text]" GOTO "[name]"          Command 3
  527. IF REGISTERED GOTO "[name]"                Command 39
  528. IF RATIO NOT n:1 GOTO "[name]"             Command 21
  529. INPUT "[text]" n                           Command 9
  530. INPUT "[text]" YN                          Command 10
  531. INPUT "[text]" RETURN                      Command 11
  532. INPUT n                                    Command 9
  533. INPUT YN                                   Command 10
  534. INPUT RETURN                               Command 11
  535. PRINT                                      Command 1
  536. PRINT "[text]"                             Command 1
  537. PRINT "[text]";                            Command 1
  538. PRINT An                                   Command 33
  539. PRINT An;                                  Command 35
  540. PRINT Cn                                   Command 34
  541. PRINT Cn;                                  Command 36
  542. PRINT % Cn1/Cn2                            Command 41
  543. PRINT % Cn1/Cn2;                           Command 42
  544. REGISTER                                   Command 38
  545. RESTART                                    Command 8
  546. RESTART AT "[name]"                        Command 20
  547. SCRATCH APPEND                             Command 6
  548. SCRATCH SHORT APPEND                       Command 44
  549. SCRATCH CHAR n                             Command 19
  550. SCRATCH EOF                                Command 45
  551. SCRATCH ID                                 Command 46
  552. SCRATCH WRITE "[text]"                     Command 12
  553. SCRATCH WRITE "[text]";                    Command 13
  554. SCRATCH WRITE INPUT                        Command 5
  555. SCRATCH WRITE INPUT;                       Command 43
  556. SET TIME n                                 Command 15
  557. SET LEVEL n                                Command 17
  558. SET ON n                                   Command 23
  559. SET OFF n                                  Command 25
  560. SPECIAL INIT                               Command 30
  561. TEMP TIME n                                Command 14
  562. TEMP LEVEL n                               Command 16
  563. TEMP ON n                                  Command 22
  564. TEMP OFF n                                 Command 24
  565. USE MENU "[path]"                          Command 18
  566.  
  567.  
  568.  
  569. TABLE 2.  Command to instruction.
  570.  
  571. PRINT                                      Command 1
  572. PRINT "[text]"                             Command 1
  573. PRINT "[text]";                            Command 1
  574. GOTO "[name]"                              Command 2
  575. IF INPUT = "[text]" GOTO "[name]"          Command 3
  576. IF INPUT = NULL GOTO "[name]"              Command 4
  577. SCRATCH WRITE INPUT                        Command 5
  578. SCRATCH APPEND                             Command 6
  579. EXIT                                       Command 7
  580. RESTART                                    Command 8
  581. INPUT "[text]" n                           Command 9
  582. INPUT n                                    Command 9
  583. INPUT "[text]" YN                          Command 10
  584. INPUT YN                                   Command 10
  585. INPUT "[text]" RETURN                      Command 11
  586. INPUT RETURN                               Command 11
  587. SCRATCH WRITE "[text]"                     Command 12
  588. SCRATCH WRITE "[text]";                    Command 13
  589. TEMP TIME n                                Command 14
  590. SET TIME n                                 Command 15
  591. TEMP LEVEL n                               Command 16
  592. SET LEVEL n                                Command 17
  593. USE MENU "[path]"                          Command 18
  594. SCRATCH CHAR n                             Command 19
  595. RESTART AT "[name]                         Command 20
  596. IF RATIO NOT n:1 GOTO "[name]"             Command 21
  597. TEMP ON n                                  Command 22
  598. SET ON n                                   Command 23
  599. TEMP OFF n                                 Command 24
  600. SET OFF n                                  Command 25
  601. DISPLAY "[path]" C                         Command 26
  602. DISPLAY "[path]" +                         Command 27
  603. DISPLAY "[path]" C+                        Command 28
  604. DISPLAY "[path]" F                         Command 29
  605. SPECIAL INIT                               Command 30
  606. An + n                                     Command 31
  607. An1+ An2                                   Command 32
  608. PRINT An                                   Command 33
  609. PRINT Cn                                   Command 34
  610. PRINT An;                                  Command 35
  611. PRINT Cn;                                  Command 36
  612. CNT UPDATE                                 Command 37
  613. REGISTER                                   Command 38
  614. IF REGISTERED GOTO "[name]"                Command 39
  615. An = n                                     Command 40
  616. PRINT % Cn1/Cn2                            Command 41
  617. PRINT % Cn1/Cn2;                           Command 42
  618. SCRATCH WRITE INPUT;                       Command 43
  619. SCRATCH SHORT APPEND                       Command 44
  620. SCRATCH EOF                                Command 45
  621. SCRATCH ID                                 Command 46
  622.  
  623.  
  624.           I have worked hard to make sure that SLIC issues useful error 
  625. messages, not just "This is wrong."  But, I have also included an 
  626. exhaustive list of the error messages from SLIC.  I hope these help you 
  627. if you get into a jam.  I have not had this problem, but if you look at 
  628. a command and it >LOOKS< ok, but you keep getting an error, retype it. 
  629. Hidden characters will cause problems!
  630.  
  631.  
  632. 0 = "None"
  633.  
  634.           No error has been detected, every thing seems fine.
  635.  
  636.  
  637. 1 = "Command Too Small to be Valid"
  638.  
  639.           The command didn't even have enough characters to be a valid 
  640. command so SLIC didn't even try and understand it.  Minimum number of 
  641. characters for a valid command is 4.  I.E. A1+1, A1=1, EXIT.
  642.  
  643.  
  644. 2 = "No Equal or Plus in Assignment"
  645.  
  646.           SLIC didn't find an "=" or "+" in line that started with an 
  647. "A", but was not an "ACCEPT" command.  The "=" or "+" tells SLIC which 
  648. kind of assignment to expect.
  649.  
  650.  
  651. 3 = "Undefined Accumulator in Assignment"
  652.  
  653.           SLIC found the "A" and a "+" or "=", but one or both of the 
  654. accumulator numbers was missing.
  655.  
  656.  
  657. 4 = "Bad Assignment"
  658.  
  659.           Assignment has pieces missing, or extra stuff.  For some 
  660. reason SLIC could not understand it.
  661.  
  662.  
  663. 5 = "Bad Number"
  664.  
  665.           On of the Assignment numbers contained characters that made it 
  666. an illegal number.
  667.  
  668.  
  669. 6 = "Unknown Command"
  670.  
  671.           One of the lines in the source file started with an unknown 
  672. command.  Check labels to make sure thay have quotes (") and comments to 
  673. be sure they start with an apostrophie (')
  674.  
  675.  
  676. 7 = "No Menu"
  677.  
  678.           The use menu command was missing the menu to be used.
  679.  
  680.  
  681. 8 = "Bad Exit Command"
  682.  
  683.           The Exit command had extra characters after it.
  684.  
  685.  
  686. 9 = "Unended Print"
  687.  
  688.           This print has a blank double quotes ("").
  689.  
  690.  
  691. 10 = "Unfinished Goto"
  692.  
  693.           This goto did not have a command name or it was unfinished.
  694.  
  695.  
  696. 11 = "Bad Name"
  697.  
  698.           The goto name was unquoted.
  699.  
  700.  
  701. 12 = "Bad Input"
  702.  
  703.           SLIC could tell this was an input command, but unsure as to 
  704. which one.
  705.  
  706.  
  707. 13 = "Input command is missing parameter(s)"
  708.  
  709.           This input command is missing one of the vital pieces.  It 
  710. could be a Quote or one of the paramters (n, YN, RETURN).
  711.  
  712.  
  713. 14 = "Input needs a second quote"
  714.  
  715.           This input was missing the trailing Quote.
  716.  
  717.  
  718. 15 = "Unknown Temp command"
  719.  
  720.           SLIC thinks this command should be a temp command, but doesn't 
  721. know which one.
  722.  
  723.  
  724. 16 = "No Temp Time"
  725.  
  726.           The number of minutes is missing.
  727.  
  728.  
  729. 17 = "No Temp Level"
  730.  
  731.           The level number is missing.
  732.  
  733.  
  734. 18 = "No Temp Flag"
  735.  
  736.           The flag number is missing.
  737.  
  738.  
  739. 19 = "Bad Temp Time"
  740.  
  741.           The time you supplied not a valid number, one of the 
  742. characters is not a number. 
  743.  
  744.  
  745. 20 = "Temp Level Out of Range"
  746.  
  747.           The level you supplied was not in the range of 0 to 255.
  748.  
  749.  
  750. 21 = "Temp Flag Out of Range"
  751.  
  752.           The flag number was not in the range of 1 to 24
  753.  
  754.  
  755. 22 = "Unfinished Display"
  756.  
  757.           Missing path and parameters.
  758.  
  759.  
  760. 23 = "Unknown Parameter"
  761.  
  762.           Display command had unknown parameters in it.
  763.  
  764.  
  765. 24 = "Bad Path"
  766.  
  767.           Display command is missing 1st Quote in path.
  768.  
  769.  
  770. 25 = "Empthy Path"
  771.  
  772.           Display path is two quotes with no other characters.
  773.  
  774.  
  775. 26 = "Unfinshed Path"
  776.  
  777.           Display path is missing final Quote.
  778.  
  779.  
  780. 27 = "Unknown Scratch"
  781.  
  782.           SLIC believes this to be a scratch file command, but doesn't 
  783. know which one.
  784.  
  785.  
  786. 28 = "Bad Scratch Write"
  787.  
  788.           SLIC thinks this command was a Scratch Write, but it's missing 
  789. parameters or quotes.
  790.  
  791.  
  792. 29 = "Bad Scratch Text"
  793.  
  794.           Scratch text was two quotes side by side.
  795.  
  796.  
  797. 30 = "Bad Restart"
  798.  
  799.           This command was a restart with extra characters that was not 
  800. a restart at command.
  801.  
  802.  
  803. 31 = "No Scratch Name"
  804.  
  805.           Unused error code.  If you get this let me know!
  806.  
  807.  
  808. 32 = "Bad Restart Name"
  809.  
  810.           Restart name was missing one or both quotes.
  811.  
  812.  
  813. 33 = "Bad Convert"
  814.  
  815.           Convert command had extra characters at the end.
  816.  
  817.  
  818. 34 = "Unknown Cnt"
  819.  
  820.           SLIC thinks this command was supposed to be a Cnt update, but 
  821. it didn't match.
  822.  
  823.  
  824. 35 = "Bad Scratch"
  825.  
  826.           The number in the Scratch Char n command is an illegal number.
  827.  
  828.  
  829. 36 = "Bad Scratch Character Number"
  830.  
  831.           The number in the Scratch Char n command is not a legal 
  832. number, contains other charcters.
  833.  
  834.  
  835. 37 = "No Scratch Number"
  836.  
  837.           The Scratch Char n command was missing the number.
  838.  
  839.  
  840. 38 = "Scratch Number Out of Range"
  841.  
  842.           The Scratch Char n commands number was out of range, 0 -255.
  843.  
  844.  
  845. 39 = "Bad Special"
  846.  
  847.           Special Init command had extra characters.
  848.  
  849.  
  850. 40 = "Unfinished print"
  851.  
  852.           SLIC thinks this is a Print command, and thinks it even knows 
  853. what type, but the data parameter(s) is/are missing.
  854.  
  855.  
  856. 41 = "No Print Number"
  857.  
  858.           SLIC thinks this is a Print A command, with no accumulator 
  859. number.
  860.  
  861.  
  862. 42 = "Bad Print Number"
  863.  
  864.           Number had extraneous characters.
  865.  
  866.  
  867. 43 = "Bad Print"
  868.  
  869.           Print command has % type designator but no "C" for CNT type 
  870. accumulators.
  871.  
  872.  
  873. 44 = "Unknown If"
  874.  
  875.           SLIC thinks this is an If command but is unsure as to which 
  876. type.
  877.  
  878.  
  879. 45 = "Bad If Name"
  880.  
  881.           The command name is missing quotes.
  882.  
  883.  
  884. 46 = "Bad If Number"
  885.  
  886.           If Ration n:1 goto "name" command has an illegal number with 
  887. extraneous characters.
  888.  
  889.  
  890. 47 = "Bad if"
  891.  
  892.           The If Input = "text" goto "Name" command was missing 
  893. parameters.
  894.  
  895.  
  896. 48 = "Bad Special Number"
  897.  
  898.           Special Init n had an illegal number with extraneous spaces.
  899.  
  900.  
  901. 49 = "Unfinished Accept"
  902.  
  903.           Accept command missing some piece, unsure as to which one (s).
  904.  
  905.  
  906. 50 = "Bad Accept Path"
  907.  
  908.           Accept path missing quotes.
  909.  
  910.  
  911. 51 = "Unknown Set command"
  912.  
  913.           SLIC thinks this is a set command, just unsure of which one.
  914.  
  915.  
  916. 52 = "No Set Time"
  917.  
  918.           Set Time n command is missing the number of minutes.
  919.  
  920.  
  921. 53 = "No Set Level"
  922.  
  923.           Set Level n command is missing the number of the level.
  924.  
  925.  
  926. 54 = "No Set Flag"
  927.  
  928.           Set On n or Set Off n is missing the flag number.
  929.  
  930.  
  931. 55 = "Bad Set Time"
  932.  
  933.           Set Time n minutes is out of range, 0 to 255.
  934.  
  935.  
  936. 56 = "Set Level Out of Range"
  937.  
  938.           Set Level number is out of range, 0 to 255.
  939.  
  940.  
  941. 57 = "Set Flag Out of Range"
  942.  
  943.           Set Flag number is out of range, 0 to 255.
  944.